//
//  ILLocalDeviceBindCacheManager.h
//  IMILabKit
//
//  Created by OrrHsiao on 2022/10/13.
//

#import <Foundation/Foundation.h>
#import "ILLocalDeviceBindModel.h"

NS_ASSUME_NONNULL_BEGIN

@interface ILLocalDeviceBindCacheManager : NSObject


- (instancetype)init NS_UNAVAILABLE;
- (instancetype)new NS_UNAVAILABLE;
- (id)copy NS_UNAVAILABLE;
- (id)mutableCopy NS_UNAVAILABLE;

/// 获取实例
+ (instancetype)sharedManager;

/// 初始化配置
/// - Parameter uid: <#uid description#>
- (void)initConfigWithUid:(nonnull NSString *)uid;

/// 将绑定信息存入本地
/// - Parameter model: 绑定信息model
- (void)saveBindInfoToLocal:(ILLocalDeviceBindModel *)model;

/// 从本地获取绑定信息
- (NSArray <ILLocalDeviceBindModel*> *)getBindInfoFromLocal;

/// 更新指定的绑定信息model的昵称
/// - Parameters:
///   - dn: deviceName,只有本地绑定信息缓存中有此数据,才可以编辑
///   - nickName: 昵称
- (void)editBindInfo:(nonnull NSString *)dn nickName:(nonnull NSString *)nickName;

/// 移除本地缓存的指定的绑定信息
/// - Parameter deviceName: dn
- (void)removeBindInfoFromLocalCache:(nonnull NSString *)deviceName;

/// 移除本地绑定信息缓存
- (void)removeLocalCache;

@end

NS_ASSUME_NONNULL_END
